package cn.yuanqiao.archive.chengguojieshou.domain;

import cn.yuanqiao.common.annotation.IdAnnotation;
import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.utils.SecurityUtils;
import com.fasterxml.jackson.annotation.JsonFormat;

public class YqdaarticulatedServerLog {

    private static final long serialVersionUID = 1L;

    private final String BIGTABLENAME = "_YQDAARTICULATED_SERVER_LOG";

    public YqdaarticulatedServerLog() {
        String tenantCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(tenantCode)){
            throw new ServiceException("TenantCode is null");
        }else {
            this.tableName = tenantCode.toUpperCase()+BIGTABLENAME;
        }
    }

    @IdAnnotation
    @JsonFormat(shape = JsonFormat.Shape.STRING)//转化成string传到前端
    private Long id;

    private String tableName;

    private String docName;

    private String docFileSize;

    private String path;

    private String result;

    private String failResult;

    private String repeatOperMode;

    @JsonFormat(shape = JsonFormat.Shape.STRING)//转化成string传到前端
    private Long articulatedId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getDocName() {
        return docName;
    }

    public void setDocName(String docName) {
        this.docName = docName;
    }

    public String getDocFileSize() {
        return docFileSize;
    }

    public void setDocFileSize(String docFileSize) {
        this.docFileSize = docFileSize;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public String getFailResult() {
        return failResult;
    }

    public void setFailResult(String failResult) {
        this.failResult = failResult;
    }

    public String getRepeatOperMode() {
        return repeatOperMode;
    }

    public void setRepeatOperMode(String repeatOperMode) {
        this.repeatOperMode = repeatOperMode;
    }

    public Long getArticulatedId() {
        return articulatedId;
    }

    public void setArticulatedId(Long articulatedId) {
        this.articulatedId = articulatedId;
    }
}
